convert list to dataframe

31

from pandas import DataFrame

People_List = ['Jon','Mark','Maria','Jill','Jack']

df = DataFrame (People_List,columns=['First_Name'])
print (df)
df.values.tolist()
# import pandas as pd 

import pandas as pd 
# list of strings 
list = ['Softhunt.net', 'Learn', 'coding', 'skills']
# Calling DataFrame constructor on list 
df = pd.DataFrame(list) 
print(df)
# import pandas as pd 

import pandas as pd 
# list of strings 
lst = ['fav', 'tutor', 'coding', 'skills']
# Calling DataFrame constructor on list 
df = pd.DataFrame(lst) 
print(df) 
L = ['Thanks You', 'Its fine no problem', 'Are you sure']

#create new df 
df = pd.DataFrame({'col':L})
print (df)

                   col
0           Thanks You
1  Its fine no problem
2         Are you sure

Comments

Submit
0 Comments